import React from 'react'

import { Grid } from 'antd-mobile'

// style
import styles from './index.less'

export default class MyGrid extends React.Component {
  render() {
    const { data } = this.props

    return (
      <div className={styles.grid_container}>
        <Grid
          data={data}
          activeStyle={false}
          renderItem={(item) => (
            <div className={styles.itemStyle}>
              <span
                style={{
                  color: item.dataColor
                }}
                className={styles.itemData}
              >{item.data}</span>
              <span
                className={styles.itemText}
              >{item.text}</span>
            </div>
          )}
        />
      </div>
    )
  }
}